
//
//  RootVC.m
//  HXDemo
//
//  Created by 李亚军 on 16/11/25.
//  Copyright © 2016年 李亚军. All rights reserved.
//

#import "RootVC.h"
#import "LYJProgressHUD.h"

@interface RootVC ()<UIGestureRecognizerDelegate>

@end

@implementation RootVC

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    
    self.navigationController.interactivePopGestureRecognizer.delegate = self;
}


#pragma mark - UIGestureRecognizerDelegate
- (BOOL)gestureRecognizerShouldBegin:(UIGestureRecognizer *)gestureRecognizer {
    
    if (self.navigationController.childViewControllers.count == 1) {
        return NO;
    }else {
        
        
        [LYJProgressHUD dismiss];
        return YES;
    }
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}



/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
